package com.data.mv.runner;

import com.data.mv.controller.MvController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author 10162085c
 */
@Slf4j
@Component
public class MvRunner implements CommandLineRunner {
    @Autowired
    MvController controller;
    @Override
    public void run(String... args) throws Exception {
        log.info("------------开始数据迁移-------");
        controller.tableInfo();
        controller.countTable();
        controller.dropTable();
        controller.createTable();
        controller.insert();
        controller.checkOver();
    }
}
